-
Notifications
You must be signed in to change notification settings - Fork 151
K8SPSMDB-1339: Validate PiTR target before starting restore #1908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -6,7 +6,6 @@ import ( | |||
"github.com/pkg/errors" | |||
|
|||
"github.com/percona/percona-backup-mongodb/pbm/defs" | |||
|
|||
psmdbv1 "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[goimports-reviser] reported by reviewdog 🐶
psmdbv1 "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1" | |
psmdbv1 "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1" |
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/client-go/kubernetes/scheme" | ||
"sigs.k8s.io/controller-runtime/pkg/client" | ||
"sigs.k8s.io/controller-runtime/pkg/client/fake" | ||
|
||
"github.com/percona/percona-backup-mongodb/pbm/defs" | ||
psmdbv1 "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[goimports-reviser] reported by reviewdog 🐶
psmdbv1 "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1" | |
psmdbv1 "github.com/percona/percona-server-mongodb-operator/pkg/apis/psmdb/v1" |
commit: 7797815 |
CHANGE DESCRIPTION
This PRs add necessary validations for point-in-time-recovery target in PerconaServerMongoDBRestore objects:
pitr.type
isdate
, backup's last write must not be equal topitr.date
.pitr.type
isdate
, backup's last write must not be later thanpitr.date
.pitr.type
isdate
, PBM must have required oplogs that includepitr.date
in its metadata.pitr.type
islatest
, PBM must have at least one oplog chunk in its metadata.CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability